Reference: runProc

The runProc procedure of a filter is called during active processing to produce filtered frames from a filter.

Prototype

int runProc(const FilterActivation *fa, const FilterFunctions *ff);

Parameters:
    fa        Pointer to filter activation structure
    ff        Pointer to callback function structure

Return value:
    0 if successful, non-zero on unknown failure.

Exceptions:
    Except* functions may be called within runProc().

Requirements:
    Function must be provided by all filters.

Remarks

The input frame is found in fa->src, and the output frame is fa->dst.  Neither structure should be modified by runProc.  If your filter is an in-place filter, the source and destination structures are both aliased to the same buffer.

Of all the functions in a filter, this function needs to run as quickly as possible and should be the most heavily optimized of all functions.  Frame-invariant computation, such as table generation, should be done in startProc or initProc instead.


Do not modify your source buffer if your filter is not in-place.  In some cases, VirtualDub will need to access your source buffer after your filter has already run, and more importantly, Nina allows source buffers to be shared between multiple filters.


Your output buffer is not persistent -- if an in-place filter follows, it will work directly in the buffer.  This means, unfortunately, that recursive filters will need an additional side buffer.

[up] back to main page


VirtualDub external filter SDK 1.05©1999-2001 Avery Lee <phaeron@virtualdub.org>